/*
============================================================================
 Name        : BlockChangePassword.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : CBlockChangePassword declaration
============================================================================
*/

#ifndef BLOCKCHANGEPASSWORD_H
#define BLOCKCHANGEPASSWORD_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "Block.h"

// CLASS DECLARATION

const TInt  KChangePasswordInputLines = 4;
class CSingleLineTextInput;
class CControl;

/**
*  CBlockChangePassword
* 
*/
class CBlockChangePassword : public CBlock
{
public:
	~CBlockChangePassword();

	static CBlockChangePassword* NewL(CBaseBlock* bsBack);

	static CBlockChangePassword* NewLC(CBaseBlock* bsBack);

public:
	void OnDraw(CFbsBitGc& g) const;

	void OnKeyEvent(const TInt& keyCode);

	void SizeChanged();

	void OnMouseUp(const TPoint& aPt);

	void WriteData(TDes8& aBuf);

	TBool ReadData(const TDesC8& aData);

	TInt GetDataLength();

	TInt16 GetDataType();
	
	void OnInput(const TDesC8& strInput);

private:
	CBlockChangePassword(CBaseBlock* bsBack);

	void ConstructL();

protected:
	void BeforeDraw(CFbsBitGc& g) const;

private:
	TInt m_nCurrent;
	CSingleLineTextInput* m_inputUserName;
	CSingleLineTextInput* m_inputOldPw;
	CSingleLineTextInput* m_inputNewPw1;
	CSingleLineTextInput* m_inputNewPw2;
	CControl* m_Ctrls[4];
};

#endif // BLOCKCHANGEPASSWORD_H
